// // Any special collision checks needed? switch (Action(player,BODY)) { case ACT_PLAYER_CHECK_STICK: if ((player->interact == NULL) || (player->interact == player2) ) { distx = ABS(player->stick.x - player2->s3d.pos.x); disty = ABS(player->stick.y - player2->s3d.pos.y); if ( (distx < FOOT*4) && (disty < FOOT*4) ) { Change_action_fall(player,player2); Set_parse_var(player2,BODY,(Get_parse_var(player2,BODY)+4)&7); player->interact = player2; Lock_player(player2, player, &player->stick, 2); } } break; case ACT_PLAYER_CHECK_PUSH: distx = ABS(player->stick.x - player2->s3d.pos.x); disty = ABS(player->stick.y - player2->s3d.pos.y); if ( (distx < FOOT*4) && (disty < FOOT*4) ) { Change_action_fall(player,player2); player2->s3d.vel.x = Random_min_max(INCHs*2,INCHs*4)<<12; player2->s3d.move.z = Bearing(&player->s3d.pos,&player2->s3d.pos); } break; case ACT_PLAYER_CHECK_HOLD: if ((player->interact == NULL) || (player->interact == player2)) { if (Action_type2(player2,BODY) != ACT_PLAYER_DISABLED_DOWN) { distx = ABS(player->stick.x - player2->s3d.pos.x); disty = ABS(player->stick.y - player2->s3d.pos.y); if ( (distx < FOOT*6) && (disty < FOOT*6) ) { player->interact = player2; Lock_player(player2, player, &player->stick, 2); } } } break; default: player->interact = NULL; } } } list2 = list2->next; } for (i=0;is3d, &player->collision, &nets[i]->collision) ) { vel= player->s3d.vel.x + player->s3d.vel.y; if(vel>16*INCH)feedback_strength=FEEDBACK_HIT_STRONGEST; else if(vel>6*INCH)feedback_strength=FEEDBACK_HIT_STRONG; else if(vel>2*INCH)feedback_strength=FEEDBACK_HIT_NORMAL; else if(vel>1*INCH)feedback_strength=FEEDBACK_HIT_WEAK; else feedback_strength=FEEDBACK_HIT_WEAKEST; ie_CNT_Feedback(player->ai.control,feedback_strength); Place_outside_collision(s3d, &nets[i]->s3d, &player->collision, &nets[i]->collision); Bump_net(s3d, &player->collision, nets[i]); if ( (nets[i]->offpeg == YES) && (gf_gameon) ) { Call_penalty(PENALTY_NET_OFF_PEGS,player,NULL); } } } // // Test for collision between players & ref if ( (Test_collision(s3d, &ref->s3d, &player->collision, &ref->collision)) && (ref->collision.on & CC_ACTOR) ) { vel= player->s3d.vel.x + player->s3d.vel.y; if(vel>16*INCH)feedback_strength=FEEDBACK_HIT_STRONGEST; else if(vel>6*INCH)feedback_strength=FEEDBACK_HIT_STRONG; else if(vel>2*INCH)feedback_strength=FEEDBACK_HIT_NORMAL; else if(vel>1*INCH)feedback_strength=FEEDBACK_HIT_WEAK; else feedback_strength=FEEDBACK_HIT_WEAKEST; ie_CNT_Feedback(player->ai.control,feedback_strength); Place_outside_collision(s3d, &ref->s3d, &player->collision, &ref->collision); Bump(s3d, &ref->s3d, &player->collision,&ref->collision); if (s3d->vel.x > FOOT) Change_action(ref,BODY,ACT_REF_FALL); } Do_player_puck_collision(player); } if (player->locktime) { if (--player->locktime == 0) s3d->vel.x = s3d->vel.x/4; } // // Test for collision against boards // // NOTE: // Board collisions are always on for players, except when they // are entering/exiting BENCH or PENALTYBOX if (player->collision.on & CC_BOARD) { vector.x = s3d->pos.x + Copy_sign(s3d->pos.x, FOOT*2); vector.y = s3d->pos.y + Copy_sign(s3d->pos.y, FOOT*2); if (Check_rink_collision(&vector)) { Put_inside_rink(&vector, &new); Actor_sfx_limit(player,BODYCHK1); angle = Rink_tangent(&new); s3d->pos.x += new.x - vector.x; s3d->pos.y += new.y - vector.y; delta = Deflect(angle, s3d->move.z); angle = (s3d->move.z-delta)&0xfff; if (angle > ANGLE180) angle = ANGLE360-angle; player->collision.bump=3; vel= player->s3d.vel.x + player->s3d.vel.y; if(vel>16*INCH)feedback_strength=FEEDBACK_HIT_STRONGEST; else if(vel>6*INCH)feedback_strength=FEEDBACK_HIT_STRONG; else if(vel>2*INCH)feedback_strength=FEEDBACK_HIT_NORMAL; else if(vel>1*INCH)feedback_strength=FEEDBACK_HIT_WEAK; else feedback_strength=FEEDBACK_HIT_WEAKEST; ie_CNT_Feedback(player->ai.control,feedback_strength); // // Break glass 12.5% of the time when we are HARD CHECKED into it. // otherwise, just shake it a bit breakit=0; if(cheat_options[CHEAT_GLASS_BREAK]!=12) { if(Random_percent(cheat_options[CHEAT_GLASS_BREAK],100))breakit=1; } if ( ((Action(player,BODY) == ACT_PLAYER_CHECKED_HARD) && (Random_percent(12,100)) || (breakit) ) ) // if ( (Action(player,BODY) == ACT_PLAYER_CHECKED_HARD) ) // if ( 1 ) { if (Find_taskid(TID_GLASS) == NULL) { Spawn_task(TID_GLASS,PRI_GENERIC, (task_type) Task_break_glass,NULL,256,CHILD); Pass_task2(task_spawn,s3d->pos.x>>12,s3d->pos.y>>12); } } else { if ( (player->s3d.vel.x > INCH*6) && (Find_taskid(TID_GLASS) == NULL) ) { Spawn_task(TID_GLASS,PRI_GENERIC, (task_type) Task_shake_glass,NULL,256,CHILD); Pass_task2(task_spawn,s3d->pos.x>>12,s3d->pos.y>>12); } } // // Slow player down depending how sharp incidence angle was angle = (angle>>8); if (angle == 0) angle = 1; s3d->vel.x = s3d->vel.x / angle; s3d->move.z = delta; } } } /////////////////////////////////////////////////////////////////////////// // // void Dec_player_bump(void) // // Called at begining of main cycle. // // Clears the collision 'bump' flag for all players. // // NOTE: // This 'bump' flag is kept just in case we want to know if player // has collided with something, so that certain AI tasks can take measures // to prevent repeated bumping into objects. // /////////////////////////////////////////////////////////////////////////// void Dec_player_bump(void) { LIST *list; PLAYER *player; list = allplayers; while (list) { player = (PLAYER *) list->data; // // Dec BUMP counter if (player->collision.bump) player->collision.bump--; if (player->ai.bump_counter) player->ai.bump_counter--; list = list->next; } } /////////////////////////////////////////////////////////////////////////// // // void Clear_player_pass(void) // // Clear all players 'pass' evaluations to 0 // // Called whenever puck is released // /////////////////////////////////////////////////////////////////////////// void Clear_player_pass(void) { LIST *list; PLAYER *player; list = allplayers; while (list) { player = (PLAYER *) list->data; player->ai.pass = 0; player->ai.pass_dir = 0; player->ai.danger = 0; list = list->next; } } /////////////////////////////////////////////////////////////////////////// // // void Sleep_player_ai(PLAYER *player,long time) // // Sets players AI to sleep for 'time' cycles. // // Effectively, shuts off mainlevel AI for said duration // /////////////////////////////////////////////////////////////////////////// void Sleep_player_ai(PLAYER *player,long time) { TASK *task; task = player->ai.task; // Get AI task (if any) if (task == task_active) Sleep(time); else if (task) task->waitState = time; } /////////////////////////////////////////////////////////////////////////// // // Lock_player // // Locks player to 'Vector' positon for 'time' gamecycles // // Used to lock a player to an opponents limb (stick or arm) during // hooks/holds, etc // /////////////////////////////////////////////////////////////////////////// void Lock_player(PLAYER *player, PLAYER *enemy, Vector *vector, long time) { player->locktim  ü˜B// // File -> tfexhib.c // Created -> Nov 29, 1997 // Author -> Tom Carbone // Description -> Fluff Exhibition Menus Handler // #define TFEXHIB_C #include "project.h" #include "include\strings.h" #include "drv\font.h" #include "drv\thing.h" #include "drv\pad.h" #include "drv\task.h" #include "drv\ot.h" #include "drv\cache.h" #include "drv\sprite.h" #include "drv\palette.h" #include "drv\parse.h" #include "drv\devapor.h" #include "drv\init.h" #include "drv\vram.h" #include "drv\sound.h" #include "drv\display.h" #include "drv\sprite\pfont.h" #include "drv\memory.h" #include "drv\util.h" #include "drv\cdrom.h" #include "drv\debug.h" #include "source\pfluff.h" #include "source\fluff.h" #include "source\player.h" #include "source\attrib.h" #include "source\tid.h" #include "source\puck.h" #include "source\rink.h" #include "source\team.h" #include "source\cdromdat.h" #include "source\action.h" #include "source\tfluff.h" #include "source\cam.h" #include "source\stadium.h" #include "source\score.h" #include "source\memcard.h" #include "drv\memcard.h" #include "source\season.h" #include "source\ai\ai.h" #include "drv\problem.h" #include "drv\random.h" #include "source\chkfile.h" #include "source\global.h" #include "source\common.h" #include "source\sim.h" #include "source\tplayer.h" #include "files.h" #include "files\test\sfx.h" #include "source\feedback.h" #include "x:\drv\ie_cont.h" #include extern void SetAudioVolume(float Music, float Sfx); extern short Play_sfx_volume1(long fx, float vol); extern MEMCARD_FILENAME memcard_filenames[]; extern FONT *fontopen; char colors[50][3]={ {224,208,48}, //"Panthers]", {173,0,44}, //"Devils]", // {8,8,88}, //"Islanders]", {152,56,56}, //"Islanders]", // {16,8,136}, //"Rangers]", {72,88,232}, //"Rangers]", {248,120,8}, //"Flyers]", {123,132,140}, //"Lightning]", {140,99,79}, //"Capitals]", {248,248,72}, //"Bruins]", {160,8,8}, //"Sabres]", {210,45,54}, //"Hurricanes]", {216,8,8}, //"Canadiens]", {175,126,38}, //"Senators]", // {240,232,32}, //"Penguins]", {224,136,56}, //"Penguins]", {194,117,0}, //"Blackhawks]", {8,176,16}, //"Stars]", {219,0,54}, //"Red Wings]", {8,8,248}, //"Blues]", // {0,28,66}, //"Maple Leafs]", {104,80,160}, //"Maple Leafs]", {229,216,179}, //"Coyotes]", {8,104,80}, //"Mighty Ducks]", {248,32,32}, //"Flames]", {144,8,80}, //"Avalanche]", {40,24,216}, //"Oilers]", {240,240,240}, //"Kings]", {0,117,133}, //"Sharks]", {8,8,232}, //"Canucks]", // {255,159,172}, //"Predators]", {128,104,88}, //"Predators]", {0,82,208}, //"Iguanas]", // {8,192,224}, //"AllStars", {184,112,112}, //"North AllStars", // {215,23,148}, //"AllStars", {120,96,128}, //"World AllStars", {1,1,1}, //"Sports]", {255,0,0}, //"Canada", {8,0,184}, //"USA", {156,222,242}, //"Finland", {255,227,0}, //"Germany", {255,0,0}, //"Russia", {180,180,180}, //"Slovakia", {255,0,0}, //"Czech Rep", {255,227,0}, //"Sweden", {0,255,0}, {2,58,1}, {113,113,113}, {84,3,79}, {199,114,3}, {0,131,0}, {110,0,5}, {6,0,87}, {222,173,0}, {188,0,0}, {177,177,177} }; int cartFlag; /****************************************************************** * mainMenu - * NOTE: firstTimeEver is cleared only if user dismisses a memory card * warning or exits the mainMenu to somewhere other than the demo. * This is so the memory card warnings will keep popping up * unless the user explicitly gets past them. ******************************************************************/ void mainMenu(void) { int i; #define NUM_MODE_SELECTIONS 7 char menuToPlayMode[] = { PLAY_MODE_EXHIBITION, PLAY_MODE_SEASON, PLAY_MODE_PLAYOFFS, PLAY_MODE_PLAYOFFS, PLAY_MODE_SHOOTOUT, PLAY_MODE_PRACTICE, PLAY_MODE_CREDITS }; char playModeToMenu[] = { -1,0,1,2,4,  ð™Bt_camera_task(camera3d, cam_tasks[camera3d->id]); break; #endif case 4: if (to_prompt == TRUE) { if (to_val == YES) { (timeouts[team])--; to_delay = 6*30; Init_random(); items = PAUSE_TEAMOPTIONS_ITEMS-1; local_select = 0; to_prompt = NO; to_val = NO; Speech_TimeoutTaken(team); Reset_team_energy(HOME); Reset_team_energy(AWAY); } else { to_prompt = NO; } } else to_prompt = TRUE; break; }; } if ( !(local_select == 4 && to_prompt == YES ) ) PM_Up_Down (team,&local_select,items,PM_WRAP_ON); // PM_scroll_window (local_select,&menu_dsp); if ( PM_TRIANGLE(team) == TRUE) { if (to_prompt == YES) { to_prompt = NO; to_val = NO; } else { PauseMenu[team].id = PAUSE_HEAD; return; } } PM_START (team); } // to_delay } } /////////////////////////////////////////////////////////////////////////// // // // void PM_UserStats (char team) // // /////////////////////////////////////////////////////////////////////////// void PM_UserStats (char team) { char local_select=0; short y_offset; PDISPLAY menu_dsp; short i; char str[180]; short y_space; s_char curspc=-20; char bigx,bigy; USER_STAT *stat; short lines,curuser; char team_dsp=team; #define PM_US_LEFT -512/2 + 130 if (team == HOME) { y_offset = -125+5+5; PauseMenu[team].ly = -77; } else { y_offset = -5+5+5; PauseMenu[team].ly = 42; } PauseMenu[team].lx = 139; menu_dsp.sx = 5.8*ONE; menu_dsp.sy = 5.6*ONE; //4.9 menu_dsp.im_w = 5.8*PM_SHADE_X; menu_dsp.im_h = 5.6*PM_SHADE_Y; menu_dsp.numlines = 5; menu_dsp.height_spc = 12; Set_display_pause(&menu_dsp, team, YES); local_select = PauseMenu[team].select = 0; Set_scale_up_down(&menu_dsp,&bigx,&bigy); curuser = 0; stat = Get_user_stat(&curuser,0); while (1) { team_dsp = padTeamAssignment[curuser]; Set_on_off(PauseMenu[team].logo[team_dsp],BODY, ON); Set_on_off(PauseMenu[team].logo[team_dsp^1],BODY, OFF); BG_Scale_fx (&menu_dsp,bigx,bigy,ONE/4,ONE/4); Select_font(font5_pause); Font_spacing(curspc); curspc += PAUSE_SPACE_SPEED; if (curspc >= -2) curspc = -2; /// lines = 0; /// strcpy(str,stat->user_name); Font_ot(hi_ot); Font_camera(NULL); Font_position(-512/2 + 80 + 10,y_offset+20); PM_blue_font (); Font_print(str); PM_white_font (); /// // Rules Font_camera(PauseMenu[team].cam); Font_ot(PauseMenu[team].ot); y_space = 10+20; /// if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"GOALS^t32 %d } %d",stat->goals, stat->shots); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } y_space += menu_dsp.height_spc; lines++; /// if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Percent_short2string (Pause_strings[PS_SHOT], 32, stat->goals, stat->shots,str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } y_space += menu_dsp.height_spc; lines++; /// if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"ASSISTS^t32 %d",stat->assists); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"POINTS^t32 %d",stat->points); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Time_short2string ("PUCK POSSESSION", 32, stat->puck_time, str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"ONE TIMERS^t32 %d } %d",stat->one_timers_goals,stat->one_timers); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Percent_short2string ("ONE TIMER", 32, stat->one_timers_goals, stat->one_timers,str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"BREAKAWAYS ^t32 %d } %d",stat->breakaway_goals, stat->breakaways); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Percent_short2string ("BREAKAWAY", 32, stat->breakaway_goals, stat->breakaways,str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"CHECKS^t32 %d",stat->checks); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"PASSES^t32 %d } %d",stat->pass_complete, stat->pass); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Percent_short2string ("PASS", 32, stat->pass_complete, stat->pass,str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"FIGHTS^t32 %d } %d",stat->fights_won, stat->fights); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { sprintf(str,"FACEOFFS^t32 %d } %d",stat->faceoff_won,stat->faceoff); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Percent_short2string ("FACEOFF", 32, stat->faceoff_won, stat->faceoff,str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// y_space += menu_dsp.height_spc; lines++; if (PM_clip_line (lines, &menu_dsp) == FALSE ) { Time_short2string ("PENALTY MINUTES", 32, stat->PIM*60, str); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } /// Sleep(1); // // Buttons // PM_Page_Up_Down (&local_select, PAUSE_USERSTATS_ITEMS, &menu_dsp, PM_WRAP_OFF); if (PM_Right(team) == TRUE) { if (local_select == menu_dsp.numlines) { for (i=0;i<=menu_dsp.numlines;i++) PM_scroll_up_immediate (&menu_dsp); local_select = 0; } stat = Get_user_stat(&curuser,1); // curuser++; // if (curuser > 7) // curuser--; // else MIDIPlaySound(PM_SOUND_SELECT); } else if (PM_Left(team) == TRUE) { if (local_select == menu_dsp.numlines) { for (i=0;i<=menu_dsp.numlines;i++) PM_scroll_up_immediate (&menu_dsp); local_select = 0; } //curuser--; stat = Get_user_stat(&curuser,-1); MIDIPlaySound(PM_SOUND_SELECT); } if ( PM_TRIANGLE(team) == TRUE) { PauseMenu[team].id = PAUSE_STATS; return; } PM_START (team); } } ////////////////////////////////////  `™B void PM_EditLines (char team) { char local_select=0; short y_offset; PDISPLAY menu_dsp; short i; char str[180]; short y_space; s_char curspc=-20; char bigx,bigy; USER_STAT *stat; short curline=0; LINE *line_ptr; char swap=OFF; char sub_select=0; short j,l_start, l_end, l_line=0; char defensive_line; #define PM_US_LEFT -512/2 + 40 if (team == HOME) { y_offset = -125+5; PauseMenu[team].ly = -24; } else { y_offset = -5+5; PauseMenu[team].ly = 95; } PauseMenu[team].lx = 183; menu_dsp.sx = 7.0*ONE; menu_dsp.sy = 5.9*ONE; menu_dsp.im_w = 7.0*PM_SHADE_X; menu_dsp.im_h = 5.9*PM_SHADE_Y; menu_dsp.numlines = 5; menu_dsp.height_spc = 12; Set_display_pause(&menu_dsp, team, YES); local_select = PauseMenu[team].select = 0; Set_scale_up_down(&menu_dsp,&bigx,&bigy); while (1) { BG_Scale_fx (&menu_dsp,bigx,bigy,ONE/4,ONE/4); Select_font(font5_pause); Font_spacing(curspc); curspc += PAUSE_SPACE_SPEED; if (curspc >= -2) curspc = -2; /// //ASL sprintf(str,"%s ^t24 STATUS OVERALL",Pause_strings[PS_Lines[curline]]); sprintf(str,"%s ^t26 STATUS OVERALL",Pause_strings[PS_Lines[curline]]); Font_ot(hi_ot); Font_camera(NULL); // Font_position(-512/2 + 60,y_offset+20); Font_position(PM_US_LEFT,y_offset+20); PM_blue_font (); Font_print(str); PM_white_font (); /// defensive_line = NO; if (curline <= 2) { // // Scoring line 1,2,3 l_line = curline; l_start = 0; l_end = 2; } else if (curline == 3) { // // Checking line l_line = curline; l_start = 0; l_end = 2; } else if (curline >= 4 && curline <=6) { // // Defensive line l_line = curline-4; l_start = 3; l_end = 4; defensive_line = YES; } else if (curline <= 8) { // // Powerplay l_line = curline-3; l_start = 0; l_end = 4; } else { // // Penalty Kill l_line = curline-3; l_start = 0; l_end = 3; } // printf("curline %d, l_line %d, l_start %d, l_end %d\n", // curline,l_line,l_start,l_end); line_ptr = &team_info[team].line_list[l_line]; /// // Rules Font_camera(PauseMenu[team].cam); Font_ot(PauseMenu[team].ot); y_space = 10+20; /// for (j=l_start;j<=l_end;j++) { if (defensive_line == NO) { } // if (PM_clip_line (j, &menu_dsp) == FALSE ) { //ASL sprintf(str,"%s %s ^t24 %s ^t12 %d %s", sprintf(str,"%s %s ^t26 %s ^t12 %d %s", player_info[team][line_ptr->playerid[j]].attrib.fname, player_info[team][line_ptr->playerid[j]].attrib.lname, Pause_strings[PS_Status[player_info[team][line_ptr->playerid[j]].stat.status]], Overall_rating2(team,line_ptr->playerid[j]), Pause_strings[PS_Positions[Decode_position(player_info[team][line_ptr->playerid[j]].attrib.position)]] ); Font_option_select (team, local_select, j-l_start); if (player_info[team][line_ptr->playerid[j]].stat.status > STATUS_ON_ICE) PM_red_font (); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } y_space += menu_dsp.height_spc; } // // Restore Defaults Font_option_select (team, local_select, (l_end-l_start+1)); strcpy(str,"Restore Line"); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); y_space += menu_dsp.height_spc; if (swap == ON) { PM_green_font (); //ASL sprintf(str,"%s %s ^t24 %s ^t12 %d", sprintf(str,"%s %s ^t26 %s ^t12 %d %s", //ASL player_info[team][sub_select].attrib.fname, player_info[team][sub_select].attrib.lname, Pause_strings[PS_Status[player_info[team][sub_select].stat.status]], Overall_rating2(team,sub_select), Pause_strings[PS_Positions[Decode_position(player_info[team][sub_select].attrib.position)]] //ASL ); if (player_info[team][sub_select].stat.status > STATUS_ON_ICE) PM_red_font(); PM_pos_print (PM_US_LEFT, y_offset+y_space, str); } Sleep(1); // // Buttons // if (local_select == (l_end-l_start+1)) { if ( PM_X(team) ) { // restore original line PM_Restore_default_line (line_ptr, team, l_line, l_start, l_end); } PM_Up_Down (team,&local_select,(l_end-l_start+1),PM_WRAP_OFF); } else { short pad_pressed; if (Any_teammate_control_pressed(team,&pad_pressed,MAPPED_PADRdown)) { if (swap == OFF) { swap = ON; MIDIPlaySound(PM_SOUND_SELECT); Check_sub_select(&sub_select,team); //ASL Verify not a goalie } else { // // wants to swap! if (On_this_line(team,l_line,sub_select,l_start,l_end) == TRUE) MIDIPlaySound(PM_SOUND_BACK); else if ((player_info[team][sub_select].stat.status <= STATUS_ON_ICE)) { line_ptr->playerid[local_select+l_start] = sub_select; swap = OFF; MIDIPlaySound(PM_SOUND_SELECT); } else MIDIPlaySound(PM_SOUND_SELECT); } } if (swap == OFF) { PM_Up_Down (team,&local_select,(l_end-l_start+1),PM_WRAP_OFF); if (PM_Right(team) == TRUE) { if (++curline > 10) curline = 0; local_select = 0; MIDIPlaySound(PM_SOUND_SELECT); } else if (PM_Left(team) == TRUE) { if (curline) curline--; local_select = 0; MIDIPlaySound(PM_SOUND_SELECT); } } else { if (PM_Right(team) == TRUE) { Inc_sub_select(&sub_select,team); #if 0 sub_select++; if (sub_select > team_info[team].num_players-1) sub_select--; else MIDIPlaySound(PM_SOUND_SELECT); #endif } else if (PM_Left(team) == TRUE) { Dec_sub_select(&sub_select,team); #if 0 if (sub_select) sub_select--; MIDIPlaySound(PM_SOUND_SELECT); #endif } } } // else local_select == 5 if ( PM_TRIANGLE(team) == TRUE) { if (swap == ON) { swap = OFF; MIDIPlaySound(PM_SOUND_BACK); } else { PauseMenu[team].id = PAUSE_TEAMOPTIONS; return; } } PM_START (team); } } void Dec_sub_select (char *sub, char team) { s_char dir=-1; do { if (*sub || dir==1) *sub+=dir; else dir = 1; } while (player_info[team][*sub].attrib.position == P_GOALIE); MIDIPlaySound(PM_SOUND_SELECT); } void Inc_sub_select (char *sub, char team) { s_char dir=1; do { *sub+=dir; if (*sub > team_info[team].num_players-1) { dir = -1; *sub= team_info[team].num_players-1; } } while (player_info[team][*sub].attrib.position == P_GOALIE); MIDIPlaySound(PM_SOUND_SELECT); } /////////////////////////////////////////////////////////////////////////// // // // void PM_TeamStats (char team) // // /////////////////////////////////////////////////////////////////////////// void PM_TeamStats (char team) { char local_select; short y_offset; CAMERA *cam; PDISPLAY menu_dsp; short i; char str[180],*str_ptr; short y_space; s_char curspc=-20; char bigx,bigy; char per_ind=0; GAME_STAT *data,total; char team_dsp=team,update_total=TRUE; #define PM_US_LEFT -512/2 + 80 #define PM_LEFT_ICON -512/2 + 80 + 40 if (team == HOME) { y_offset =